package com.zangs.emqx_expand.emqx.mqtt;

import lombok.Getter;
import lombok.Setter;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Setter
@Getter
@Configuration
@ConfigurationProperties(prefix = "mqtt")
public class MqttConfig {
    /**
     * 连接地址
     */
    private String brokerUrl;
    /**
     * 客户端id
     */
    private String clientId;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 自动重连
     */
    private boolean autoReconnect;
    /**
     * 断开连接后清除会话
     */
    private boolean cleanSession;
    /**
     * 订阅主题，可以为空
     */
    private List<String> topics;



}